package sniff.diller;

import jpcap.packet.IPPacket;
import jpcap.packet.Packet;
import sniff.pack.CommonIPPacket;

public class IPPacketDiller {
	public static CommonIPPacket dill(Packet pack) {
		IPPacket ipPack = (IPPacket) pack;
		CommonIPPacket comIpPack =null;
		if(ipPack.version==4) {
			comIpPack = IPv4PacketDiller.dill(pack);
		}else if(ipPack.version==6) {
			comIpPack = IPv6PacketDiller.dill(pack);
		}else {
			System.out.println("!!!!!!!error IPPacketDiller");
		}
		return comIpPack;
	}
}
